﻿<%@ Page Language="C#" %>
<%@ import Namespace="System.Data.OleDb" %>
<%@ import Namespace="System.Data" %>
<%    OleDbConnection conn = null;
try
{
    Response.ContentType = "text/xml";
    conn = DBOp.DbConn;
    OleDbCommand comm = conn.CreateCommand();
    comm.CommandText = "select t1.城区名称,t1.区域面积 as 区域面积,t1.建筑面积 as 建筑面积,t1.建筑投影面积 as 投影面积 from 城区面积统计 t1";
    System.Data.DataTable dt = new System.Data.DataTable();
    OleDbDataAdapter oda = new OleDbDataAdapter(comm);
    oda.Fill(dt);
     %><chart palette='2' caption='分城区面积统计' subCaption="（单位：平方米）" labelDisplay='ROTATE' slantLabels='1'  shownames='1' showvalues='1' formatNumberScale='0' decimals='1' numberPostfix='平方米' baseFontSize='12' baseFontFamily='宋体'>
    <categories>    <%    foreach (DataRow dr in dt.Rows)    {
               %>
               <category label='<%=dr["城区名称"].ToString() %>' />               <%    }         %>
    </categories>
               <dataset seriesName='区域面积' color='AFD8F8' showValues='0'>                    <%foreach (DataRow dr1 in dt.Rows)                      {                          %>
                          <set value='<%=dr1["区域面积"].ToString() %>' />                                                    <%                             }                    %>
               </dataset>
                <dataset seriesName='建筑投影面积' color='F6BD0F' showValues='0'>                    <%foreach (DataRow dr1 in dt.Rows)                      {                          %>
                          <set value='<%=dr1["投影面积"].ToString() %>' />    <%                             }                    %>
               </dataset>               
                <dataset seriesName='建筑面积' color='8BBA00' showValues='0'>
                    <%foreach (DataRow dr1 in dt.Rows)                      {                          %>                          <set value='<%=dr1["建筑面积"].ToString() %>' />                                                    
                    <%                             }                    %>
               </dataset>                             
    <styles>
         <definition>
            <style name='caption' type='font' font='宋体' size='16' color='000000' /> 
            <style name='label' type='font' font='宋体' size='12' Bold='1' color='000000' /> 
         </definition>
         <application>
            <apply toObject='DataLabels' styles='label' />
            <apply toObject='DataValues' styles='label' />
            <apply toObject='Caption' styles='caption' />
            <apply toObject='ToolTip' styles='label' />
            <apply toObject='Legend' styles='label' />
            <apply toObject='ToolTip' styles='label' />
            <apply toObject='ToolTip' styles='label' />
         </application>   
    </styles> 
</chart>

<% 
    }
catch (Exception ex) { 
    
}
    finally{
    if(conn != null)
    conn.Close();} %>